package com.cy.stone.system.infrastructure.database.entity;

import com.cy.stone.common.base.BaseEntity;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * 操作日志记录表 实体类。
 *
 * @author Wings
 * @since 2023-12-24
 */
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "操作日志记录表")
@Table(value = "ST_OPER_LOG")
public class OperLogEntity extends BaseEntity {

    /**
     * 模块标题
     */
    @Schema(description = "模块标题")
    @Column(value = "title")
    private String title;

    /**
     * 业务类型（0其它 1新增 2修改 3删除）
     */
    @Schema(description = "业务类型（0其它 1新增 2修改 3删除）")
    @Column(value = "business_type")
    private String businessType;

    /**
     * 方法名称
     */
    @Schema(description = "方法名称")
    @Column(value = "method_name")
    private String methodName;

    /**
     * 请求方式
     */
    @Schema(description = "请求方式")
    @Column(value = "request_method")
    private String requestMethod;

    /**
     * 操作人员
     */
    @Schema(description = "操作人员")
    @Column(value = "oper_name")
    private String operName;

    /**
     * 请求URL
     */
    @Schema(description = "请求URL")
    @Column(value = "oper_url")
    private String operUrl;

    /**
     * 主机地址
     */
    @Schema(description = "主机地址")
    @Column(value = "oper_ip")
    private String operIp;

    /**
     * 请求参数
     */
    @Schema(description = "请求参数")
    @Column(value = "oper_param")
    private String operParam;

    /**
     * 返回参数
     */
    @Schema(description = "返回参数")
    @Column(value = "json_result")
    private String jsonResult;

    /**
     * 操作状态（0正常 1异常）
     */
    @Schema(description = "操作状态（0正常 1异常）")
    @Column(value = "oper_status")
    private String operStatus;

    /**
     * 错误消息
     */
    @Schema(description = "错误消息")
    @Column(value = "error_msg")
    private String errorMsg;

    /**
     * 执行时间
     */
    @Schema(description = "执行时间")
    @Column(value = "COST_TIME")
    private Long costTime;
}
